package wxshop.api.admin.model;

import java.io.Serializable;

/**
 * Created by 121874694@qq.com on 2018/3/1.
 */
public class Admin implements Serializable{
	private int id;
	private String name;
	private String password;
	private int accessLevel;
	private String roleName;
	private Roles roles;
	public Admin () {
	}

	public Admin(int id, String password) {
		this.id = id;
		this.password = password;
	}

	public Admin (int id) {
		this.id = id;
	}
	
	public Admin (String name, String password) {
		this.name = name;
		this.password = password;
	}
	
	public Admin (int id, String name, String password) {
		this.id = id;
		this.name = name;
		this.password = password;
	}
	
	public Admin (int id, int accessLevel) {
		this.id = id;
		this.accessLevel = accessLevel;
	}
	
	public Admin (int id, String name, String password, Roles roles) {
		this.id = id;
		this.name = name;
		this.password = password;
		this.roles = roles;
	}
	
	public Admin (int id, String name, String password, int accessLevel, Roles roles) {
		this.id = id;
		this.name = name;
		this.password = password;
		this.accessLevel = accessLevel;
		this.roles = roles;
	}

	public int getId () {
		return id;
	}
	
	public void setId (int id) {
		this.id = id;
	}
	
	public String getName () {
		return name;
	}
	
	public void setName (String name) {
		this.name = name;
	}
	
	public String getPassword () {
		return password;
	}
	
	public void setPassword (String password) {
		this.password = password;
	}
	
	public Roles getRoles () {
		return roles;
	}
	
	public void setRoles (Roles roles) {
		this.roles = roles;
	}
	
	public int getAccessLevel () {
		return accessLevel;
	}
	
	public void setAccessLevel (int accessLevel) {
		this.accessLevel = accessLevel;
	}
	public String getRoleName(){
		return roles.getRole();
	}
	public int getRoleId(){
		return roles.getId();
	}
	
	@Override
	public String toString () {
		return "Admin{" +
				"id=" + id +
				", name='" + name + '\'' +
				", password='" + password + '\'' +
				", accessLevel=" + accessLevel +
				", roles=" + roles +
				'}';
	}
}
